package cn.lizemin.builder.version0.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lzm
 * @version 1.0
 * @description: 建筑类
 * @date 2022/4/26 10:37
 */
public class Building {

    private List<String> buildingComponents = new ArrayList<>();

    /**
     * 建造地基
     * @param basement
     */
    public void buildBasement(String basement) {
        this.buildingComponents.add(basement);
    }

    /**
     * 建造屋顶
     * @param proof
     */
    public void buildProof(String proof) {
        this.buildingComponents.add(proof);
    }

    /**
     * 建造墙体
     * @param wall
     */
    public void buildWall(String wall) {
        this.buildingComponents.add(wall);
    }

    @Override
    public String toString() {
        String building = "";
        for (int i = 0; i < buildingComponents.size(); i++) {
            building += buildingComponents.get(i);
        }
        return building;
    }
}
